package com.tcy.springbootregister;

import com.tcy.anno.EnableCommonConfig;
import com.tcy.config.CommonConfig;
import com.tcy.config.CommonImportSelector;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Import;
import pojo.User;

@SpringBootApplication
//@Import({CommonConfig.class,CommonConfig.class,CommonConfig.class})//import手动扫描类，引入配置类后，内部bean也会被引入
//@Import(CommonImportSelector.class)//引入的多个配置类
@EnableCommonConfig
public class SpringbootRegisterApplication {
    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(SpringbootRegisterApplication.class, args);
//        User user = context.getBean(User.class);
//        System.out.println(user);

        System.out.println(context.getBean("email"));
    }
}
